import request from '@/utils/request'

export function getCaseSteps(params) {
  return request({
    url: 'step/',
    method: 'get',
    params: params
  })
}

export function getStep(id) {
  return request({
    url: 'step/' + id + '/',
    method: 'get'
  })
}

export function getPreSteps(params) {
  return request({
    url: 'preStep/',
    method: 'get',
    params: params
  })
}

export function createStep(data) {
  return request({
    url: 'step/',
    method: 'post',
    data: data
  })
}

export function updateStep(id, data) {
  return request({
    url: 'step/' + id + '/',
    method: 'patch',
    data: data
  })
}
export function deleteStep(id) {
  return request({
    url: 'step/' + id + '/',
    method: 'delete'
  })
}
